package com.tsd.common.dao;

import com.tsd.common.entity.CommonShortUrl;
import com.tsd.common.entity.CommonShortUrlExt;
import com.tsd.core.vo.PageBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 描述：CommonShortUrlMapper
 *
 * @author Hillpool
 * @date 2022/12/07 11:35:25
 */
public interface CommonShortUrlMapper {

    CommonShortUrl selectByPrimaryKey(Long id);

    CommonShortUrlExt selectBySid(String sid);

    int deleteByPrimaryKey(Long id);

    int insert(CommonShortUrl record);

    int insertSelective(CommonShortUrl record);

    int insertList(@Param("list") List<CommonShortUrlExt> list);

    int updateByPrimaryKey(CommonShortUrl record);

    int updateByPrimaryKeySelective(CommonShortUrl record);

    int updateList(@Param("list") List<CommonShortUrlExt> list);

    List<CommonShortUrlExt> selectByEntity(CommonShortUrlExt record);

    List<CommonShortUrlExt> selectByPage(@Param("params") Map<String, Object> params, @Param("page") PageBean page);

    List<CommonShortUrlExt> selectCount1Page(@Param("params") Map<String, Object> params, @Param("page") PageBean page);

    List<CommonShortUrlExt> selectByParams(@Param("params") Map<String, Object> params);

    CommonShortUrlExt selectValidByCode(@Param("code") String code);
}